1. Field of the Invention
The present invention is generally directed to a client-server system and, more particularly to a technique for improving response time of a user interface associated with a state-based client-server application.
2. Description of the Related Art
As is well known, a client-server system is a network architecture that separates a client from a server. In general, client-server systems are used to provide a scalable architecture for distributed computing. Typically, server software is installed and runs on a relatively powerful computer system or on systems which have access to databases or other information resources. Often, server systems are centrally maintained. Client software, on the other hand, is generally installed and run on personal computers (PCs) or workstations. Often, client systems are geographically or organizationally distributed.
Web-based applications are often implemented using a client-server model. For example, in a typical web-based client-server system, a client employs a web browser that facilitates communication with servers that supply information commonly associated with various websites. For example, a user of a client may display information from a news website by entering a uniform resource locator (URL) of the website into the web browser of the client. The website server finds the information required to display a requested article and assembles the article into a web page, which is sent to the web browser of the client to allow the user to read the requested article. In general, a server waits for requests and, upon receiving a request, serves the request by sending an appropriate reply to a requesting client. In such a web-based application, a client sends requests corresponding to user input, received by the client, via a user interface (UI), to a server. The client waits to receive a reply and upon receiving a reply to the request updates a display of the UI accordingly.
In general, client-server protocols may be stateless or state-based. In general, a stateless server does not keep client specific information between requests, e.g., a hyper text transfer protocol (HTTP) server for static hyper text markup language (HTML) pages. Rather, requests are each independently serviced based on information supplied by the client. On the other hand, a state-based server maintains client session specific information between requests from that client. For example, in a web-based system for configuring an automobile for purchase, a state-based server may maintain information regarding selections (e.g., model, engine, transmission, color, options, etc.) selected so far. In this way actions and responses of the server can be tailored to a current session context.
Frequently, in client-server applications, a user of a client will experience a noticeable delay between requesting information and the information being provided to a display of a user interface (UI) of the client. A typical client-server web application usage includes the following steps: (1) a web-based application presents a UI in response to a user entering a URL into a web browser; (2) the user manipulates the web-based application via the UT by entering data into data fields, selecting various buttons, etc.; (3) information corresponding to the user manipulation is transferred to the server; (4) the server performs computations and moves the application into a new state; (5) the server then provides information to the client in reply; and (6) finally the client updates the UI with the received information. State-based UI techniques have been employed to streamline server-side processing or to provide more sophisticated client-side functionality.
Unfortunately, in many cases, a user of a client may experience a significant delay between manipulation of the UI and update of the UI. The delay in update of the UI may be attributed to a number of different factors. For example, the delay may be attributed to server processing time required for generating a next state based on user input; network bandwidth constraints; network latency delays; and/or a complete refresh of the UI.
A number of different techniques have been implemented within a client-server context in an attempt to improve update times of a client user interface (UI). For example, web browser-based client UIs have been asynchronously updated without requiring a complete refresh of the UI by using a scripting language, such as JavaScript, or by using a plug-in such as Adobe Flash. Using this approach, data has been transferred from the server in the form of an extensible markup language (XML), e.g., asynchronous JavaScript and XML (AJAX), or a proprietary format, such as actionscript message format (AMF) in the case of Flash. The results of client operations have also been retrieved from a linear server-side cache and the client has then been served the data representing the results without the delay caused by server processing. Unfortunately, this approach usually cannot handle a complex interdependent sequence of user operations in the case where server processing is necessary to put the application in a correct state.
In order to reduce the amount of data transferred between a server and client, efficient data transfer formats have also been implemented. For example, if the client-server communication protocol uses XML, it can be compressed to a fraction of its size. Moreover, compact formats such as JavaScript Object Notation (JSON), or efficient binary formats such as AMF can be used in the case of JavaScript or Flash-based clients. However, the extra load on the client and server, as well as the time taken to handle the compression/encoding of the data to be transferred, may still result in undesirable update times for a UI. Thus, none of the existing approaches satisfactorily address the various problems listed above. In particular, the approaches described above do not address the problem of delay due to large network latency.
What is needed is a technique for improving user experiences with state-based client-server applications, such as configuration software, through the reduction of delay between a user action and an associated update of a user interface.